begintalkscript;
variables;

begintalknode 1;
state = -1;
nextstate = -1;
condition = 1;
question = "Jerry.";
text1 = "_Hello. Just do what you do here, and come then to this dock._";

begintalknode 2;
state = 1;
nextstate = -1;
condition = 1;
question = "Yes!";
text1 = "_Okay, we'll set off._";
code = set_flag(119, 12, 1);
       move_to_new_town(19, 30, 25);
break;




begintalknode 3;
state = -1;
nextstate = 5;
condition = 1;
question = "Jane";
text1 = "You are not sure if this woman is an Avernite or of surface people. Her skin is quite pale, but her accent is of a kind that can't be heard in Avernum.";
text2 = "_Hello. What brings you down here?_";
action = INTRO;
text5 = "_So you're back._";

begintalknode 4;
state = 5;
nextstate = 6;
condition = 1;
question = "What is this place?";
text1 = "_This is the Alchemist's Lab. Or was. There is not much left of the original labratory anymore. Nowadays it is more like an institute, a small one, and a library._";

begintalknode 5;
state = 5;
nextstate = -1;
condition = 1;
question = "Can I go in there?";
text1 = "_Sure. I don't know what adventurers like you have to do here, but this place is not forbidden. Just go ahead._ She opens the gate.";
code = set_terrain(25, 26, 477);
break;

begintalknode 6;
state = 6;
nextstate = -1;
condition = 1;
question = "When was this place built?";
text1 = "_Centuries ago. The Empire doesn't like researchers of arcane lore, so they have stopped supporting us. Thus, this place has become a too small hollow for alchemists._";






begintalknode 10;
state = -1;
nextstate = 8;
condition = 1;
question = "Harald";
text1 = "An exceptionally young wizard is sitting at his desk, among a bunch of interessting papers.";
text2 = "_Harald my name is. Greetings!_";
action = INTRO;
text5 = "_You are always welcome here._";

begintalknode 11;
state = 8;
nextstate = 9;
condition = get_flag(111, 11) == 0;
question = "What are you doing here?";
text1 = "_I am researching magical mines. Would you like to hear about them?_";

begintalknode 12;
state = 9;
nextstate = 10;
condition = 1;
question = "Yes, please!";
text1 = "_Well, magical mines are canisters with a magical charge. They blow up on certain conditions, either damaging someone or breaking a wall._";
text2 = "_The mines appear in three colors. The red ones are fiery. They tend to contain a sulphur charge. The green ones are acidic. They contain sulphuric acid. Of the blue ones we don't know that much._";
text3 = "_The mines appear in various sizes. If found alone, they explode if you go too near it. But mostly they are grouped. If grouped, there is one root mine that will explode if too close it._";
text4 = "_Then, the chain mines around it pay forward the explosion. Mines pay it forward only to mines of the same color. In the end of the explosion, there is a bomb._";
text5 = "_The bombs appear as crystals in the same three colors as mines. They are strong enough to bring down walls._";
text6 = "_By the way, you might want to know how to deal with them._";

begintalknode 13;
state = 10;
nextstate = 11;
condition = 1;
question = "Can you teach me how to deal with them?";
text1 = "_I have developed two spells with which you can either denotate or disarm the explosives. But I studied for months, so I would like to have some credits of it. Say, 200 coins._";

begintalknode 14;
state = 11;
nextstate = -1;
condition = 1;
question = "Teach me those spells, please. (Pay 200 coins)";
action = PAY 111 11 1 200;
text1 = "_Oh! Well, okay._ He teaches you two spells which act quite like the spells Unlock Doors and Dispel Barrier. They're called Unleash Mine and Dispel Mine.";
text2 = "(To use them, simply cast Unlock Doors or Dispel Barrier near the mines. Unlock Doors denotates the mines and Dispel Barrier disarms them.)";
text3 = "_You don't have it. I will not tell you anything._";
text5 = "_I have already taught you that spell._";

begintalknode 15;
state = 8;
nextstate = 8;
condition = 1;
question = "Are there many magi working here?";
text1 = "_No, not many. Generally there are not many magi alive. Nowadays they are bounty-hunted by the Empire. That's why so many choose to come to Rovan._";

begintalknode 16;
state = 8;
nextstate = 8;
condition = get_flag(11, 1);
question = "What happened in the experiment hall?";
text1 = "_Oh, you've seen my mess already. Well, I tried to create one of those magical mines myself. I didn't success very well._";







begintalknode 20;
state = -1;
nextstate = 12;
condition = 1;
question = "Tyrion";
text1 = "This wizard is clearly an Avernite. He is very old, but he's in good condition.";
text2 = "_Hello, young adventurers. Me, call me Tyrion. Oh, seeing you brings back memories into my mind._";
action = INTRO;
text5 = "_So it is you._";

begintalknode 21;
state = 12;
nextstate = 13;
condition = 1;
question = "What memories?";
text1 = "_Oh, I used to be of adventurer spirit myself in the past. But I have grown old. Adventuring life is too hard for me, so I choose to spend the last days of my life doing one of the things I like the most._";

begintalknode 22;
state = 13;
nextstate = 14;
condition = 1;
question = "What is it that you like the most.";
text1 = "_Nowadays it's researching._";

begintalknode 23;
state = 14;
nextstate = 14;
condition = 1;
question = "There aren't many adventurers that like researching the most.";
text1 = "_I understand. But I do, especially now when I am too old for adventures. It is socalming. To sit in a small office room in a complete silence reading books, maybe travelling somewhere for more information, writing notes etc._";
text2 = "_As a matter of fact, researching and adventuring have more things in common than thought._";

begintalknode 24;
state = 14;
nextstate = 15;
condition = get_flag(111, 24) == 0;
question = "What do you currently research?";
text1 = "_I am researching a special piece of magical machinery called lightning pillars. Would you like to hear about what I have found out?_";

begintalknode 25;
state = 15;
nextstate = -1;
condition = 1;
question = "Yes, please!";
text1 = "_Well, they look like pillars but the tops of them are runed. Be sure to look for same kinds of runes nearby. They guard that spot with the runes._";
text2 = "_They are like security devices. If someone enters the spot, the lightning pillars alarm a nearby force pillar. The force pillar gives them a magical charge._";
text3 = "_Using the charge, they create a lightning bolt with which they harm the invader. The pillars can be made harmless by deactivating the force pillar._";
text4 = "_To deactivate, simply touch the top of the pillar. It doesn't give you a spark if you're fast enough. The magic should then escape the pillar, deactivating it._";
code = set_flag(111, 24, 1);
break;